<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<base href="${request.contextPath}/"/>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>农业四情微气象监测平台</title>
		<link rel="stylesheet" href="Content/desktop/css/index.css" />
		<script src="Content/desktop/js/flexible.js"></script>
	</head>

	<body>
		<section class="mainbox">
			<section class="box">
				<div class="column">
					<div class="top">
						<div class="tq">
							<div class="tq_text">
								<h1>&#xe689;</h1>
								<h2>${weatherInfo.remarks!''}</h2>
								<h3>${weatherInfo.airTemperature!'0'}<span>℃</span></h3>
							</div>
							<ul class="tq_list">

								<#if weatherInfo ??>
								<li><span>温度</span><b>${weatherInfo.airTemperature!'0'}℃</b></li>
								<li><span>风向</span><b>${weatherInfo.windDirection!'0'}</b></li>
								<li><span>风速</span><b>${weatherInfo.windSpeed!'0'}km/h</b></li>
								<li><span>光照度</span><b>${weatherInfo.lightIntensity!'0'}Lux</b></li>
							</#if>
							</ul>
						</div>
						<div class="td pd">
							<dl>
								<dt>耕地总面积</dt>
								<dd>${landArea!'0'}亩</dd>
							</dl>
							<div id="rollAD" style="">
								<div id="rollText">
									<#if cropInforCountList ??>
										<#list cropInforCountList as item>
											<p><span>作物名称：${item.cropModel!}</span><b>${item.cropIntroduction!}亩</b></p>
										</#list>
									</#if>
								</div>
							</div>

						</div>
					</div>
				</div>
				<div class="column">
					<div class="top">
						<div class="t_t">
							<h1 class="bg1">&#xe62a;</h1>
							<h2>天气预警</h2>
						</div>
						<div class="c_list">
							<ol class="ol3">
								<#if weatherForecast ??>
								<li>
									<b>灾害名称</b>
									<span>${weatherForecast.disastersName!}</span>
								</li>
<!--								<li>-->
<!--									<b>灾害级别</b>-->
<!--									<span>${weatherForecast.disastersName!}</span>-->
<!--								</li>-->
								<li>
									<b>发生地点</b>
									<span>${weatherForecast.landNum!}</span>
								</li>
								<li>
									<b>预计发生时间</b>
									<span>${weatherForecast.createDate?string('yyyy-MM-dd HH:mm:ss')}</span>
								</li>
								</#if>
							</ol>
						</div>
					</div>
				</div>
				<div class="column">
					<div class="top">
						<div class="t_t">
							<h1 class="bg2">&#xe687;</h1>
							<h2>虫害预警</h2>
						</div>
						<div class="c_list">
							<ol class="ol3">
								<#if pestInfo ??>
								<li>
									<b>虫害预警</b>
									<span>${pestInfo.cqname!}</span>
								</li>
								<li>
									<b>发生地点</b>
									<span>${pestInfo.landNum!}</span>
								</li>
								<li>
									<b>预计发生时间</b>
									<span>${pestInfo.createTime?string('yyyy-MM-dd HH:mm:ss')!}</span>
								</li>
							</#if>
							</ol>
						</div>
					</div>
				</div>
				<div class="column">
					<div class="top">
						<div class="t_t">
							<h1 class="bg3">&#xe630;</h1>
							<h2>病害预警</h2>
						</div>
						<div class="c_list">
							<ol class="ol3">
								<#if diseaseManagementInfo ??>
								<li>
									<b>病害名称</b>
									<span>${diseaseManagementInfo.information!}</span>
								</li>
								<li>
									<b>发生地点</b>
									<span>${diseaseManagementInfo.landName!}</span>
								</li>
								<li>
									<b>预计发生时间</b>
									<span>${diseaseManagementInfo.createTime?string('yyyy-MM-dd HH:mm:ss')!}</span>
								</li>
							</#if>
							</ol>
						</div>
					</div>
				</div>
			</section>
			<section class="box">
				<div class="column">
					<div class="list">
						<h1 style="color:#fb5b6d;">天气预警</h1>
						<div class="dl_list bg1">
							<dl>
								<dt>灾害名称</dt>
								<#if weatherForecastList ??>
									<#list weatherForecastList as item>
										<dd>${item.disastersName!}</dd>
									</#list>
								</#if>
							</dl>
							<dl>
								<dt>发生地点</dt>
								<#if weatherForecastList ??>
										<#list weatherForecastList as item>
											<dd>${item.landNum!}</dd>
										</#list>
								</#if>
							</dl>
							<dl>
								<dt>预计发生时间</dt>
								<#if weatherForecastList ??>
									<#list weatherForecastList as item>
										<dd>${item.createDate?string('yyyy-MM-dd HH:mm:ss')}</dd>
									</#list>
								</#if>
							</dl>
						</div>
					</div>
				</div>
				<div class="column">
					<div class="list">
						<h1 style="color:#fa8115;">虫害预警</h1>
						<div class="dl_list bg2">
							<dl>
								<dt>灾害名称</dt>
								<#if pestList ??>
									<#list pestList as item>
									<dd>${item.cqname!}</dd>
									</#list>
								</#if>
							</dl>	
							<dl>
								<dt>发生地点</dt>
								<#if pestList ??>
									<#list pestList as item>
										<dd>${item.landNum!}</dd>
									</#list>
								</#if>
							</dl>
							<dl>
								<dt>预计发生时间</dt>
								<#if pestList ??>
									<#list pestList as item>
										<dd>${item.createTime?string('yyyy-MM-dd HH:mm:ss')}</dd>
									</#list>
								</#if>
							</dl>
						</div>
					</div>
				</div>
				<div class="column">
					<div class="list">
						<h1 style="color:#e95ab5;">病害预警</h1>
						<div class="dl_list bg3">
							<dl>
								<dt>病害名称</dt>
								<#if diseaseManagementList ??>
									<#list diseaseManagementList as item>
										<dd>${item.information!}</dd>
									</#list>
								</#if>
							</dl>
							<dl>
								<dt>发生地点</dt>
								<#if diseaseManagementList ??>
								<#list diseaseManagementList as item>
								<dd>${item.landName!}</dd>
							</#list>
					</#if>
							</dl>
							<dl>
								<dt>预计发生时间</dt>
								<#if diseaseManagementList ??>
									<#list diseaseManagementList as item>
								<dd>${item.createTime?string('yyyy-MM-dd HH:mm:ss')}</dd>
									</#list>
								</#if>
							</dl>
						</div>
					</div>
				</div>
				
			</section>

		</section>
		<script type="text/javascript">
			var textDiv = document.getElementById("rollText");
			var textList = textDiv.getElementsByTagName("p");
			if (textList.length > 2) {
				var textDat = textDiv.innerHTML;
				var br = textDat.toLowerCase().indexOf("<br", textDat.toLowerCase().indexOf("<br") + 3);
				//var textUp2 = textDat.substr(0,br);
				textDiv.innerHTML = textDat + textDat + textDat.substr(0, br);
				textDiv.style.cssText = "position:relative; top:0";
				var textDatH = textDiv.offsetHeight;
				MaxRoll();
			}
			var minTime, maxTime, divTop, newTop = 0;

			function MinRoll() {
				newTop++;
				if (newTop <= divTop + 68) {
					textDiv.style.top = "-" + newTop + "px";
				} else {
					clearInterval(minTime);
					maxTime = setTimeout(MaxRoll, 3800);
				}
			}

			function MaxRoll() {
				divTop = Math.abs(parseInt(textDiv.style.top));
				if (divTop >= 0 && divTop < textDatH - 68) {
					minTime = setInterval(MinRoll, 1);
				} else {
					textDiv.style.top = 0;
					divTop = 0;
					newTop = 0;
					MaxRoll();
				}
			}
		</script>
	</body>
</html>
